<template>
	<!--  id="guide" class="video-height" -->
	<view class="content">
		<!-- 		<video id="myVideo" src="../../../static/home/shipin.mp4" :direction="0" :autoplay="true" :controls="false"
			:show-play-btn="false" :show-center-play-btn="false" :enable-progress-gesture="false" objectFit="fill"
			@timeupdate="timeupdate" @ended="goIndex" style="object-fit: fill;	width:750rpx;flex:1;" preload='auto' :show-loading="false"></video>
 -->
		<!-- <video id="myVideo"
			src="https://img.cdn.aliyun.dcloud.net.cn/guide/uniapp/%E7%AC%AC1%E8%AE%B2%EF%BC%88uni-app%E4%BA%A7%E5%93%81%E4%BB%8B%E7%BB%8D%EF%BC%89-%20DCloud%E5%AE%98%E6%96%B9%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B@20200317.mp4"
			@error="videoErrorCallback" :danmu-list="danmuList" enable-danmu danmu-btn controls></video> -->

		<!-- <cover-view class="title-container">
			<view class="skip-button">
				<view class="border-animation"></view>
				<view class="content" @click="goIndex"><text class="content">跳过</text></view>
			</view>
		</cover-view> -->

		<!-- <view class="tiaoguo" @click="goIndex">跳过</view> -->

		<!-- <div class="splash-container">
			<video src="@/static/menu_imgs/kaiji.mp4" autoplay preload="auto"
				@ended="onVideoEnded" class="splash-video" controls="false" show-fullscreen-btn="false" show-play-btn="false"
				show-center-play-btn="false" show-loading="false"></video>
		</div> -->

		<div class="splash-container">
			<image src="@/static/menu_imgs/kaiji.jpg" class="splash-image" @load="onImageLoaded">
			</image>
		</div>

	</view>
</template>
<script>
	export default {
		data() {
			return {
				push_id: null,
			}
		},
		onLoad() {},
		methods: {

			onImageLoaded() {

				let self = this;
				setTimeout(function() {
					// console.log('完毕');
					self.goIndex();
				}, 2000);

			},
			goIndex() {
				const value = uni.getStorageSync('Bearer');
				console.log(value)
				if (value) {
					// 如何已经有，直接去home首页

					// uni.switchTab({
					// 	url: '/pages/switchPages/index'
					// });
					uni.reLaunch({
						url: "/pages/switchPages/main"
					})
				} else {
					uni.redirectTo({
						url: '/pages/login/login'
					});
				}
			}
		}
	}
</script>

<style>
	.content {
		/* width: 750rpx; */
		/* height: 100vh; */
		/* background-color: #E9F3FD; */
	}

	.splash-container {
		padding: 85rpx 0;
		background-color: #E9F3FD;
	}

	.splash-image {
		width: 750rpx;
		height: 1500rpx;
	}

	.tiaoguo {
		position: absolute;
		top: 180rpx;
		right: 30rpx;
		z-index: 9999;
		border: 1px solid black;
		border-radius: 30rpx;
		padding: 10rpx;
	}

	.splash-video {
		width: 750rpx;
		height: 1300rpx;
		/* object-fit: cover; */
	}


	/* .video-height {
		width: 750rpx;
		flex: 1;
		background-color: white;
	}

	.skip-button {
		position: fixed;
		top: 100rpx;
		right: 20px;
		width: 80rpx;
		height: 80rpx;
		border-radius: 50px;
		background-color: #ffffff;
		display: flex;
		justify-content: center;
		align-items: center;
		z-index: 999;
	}

	.content {
		color: #ff0000;
		font-size: 30rpx;
		font-weight: bold;
		cursor: pointer;
	} */
</style>